{extend name="public:base"/}

{block name="title"}分类列表{/block}
{block name="style"}{/block}

{block name="main"}

<section class="content">

    <div class="row">
        <div class="col-xs-12">
            <div class="box">
                <div class="box-header m-b-sm">
                    <h3 class="box-title">分类列表</h3>
                </div>
                <!--
                <div class="nav-tabs-custom">
                    <ul class="nav nav-tabs">
                        <li class="active"><a href="/backend/addons/rf-merchants/config/index"> 配置管理</a></li>
                        <li><a href="/backend/addons/rf-merchants/config-cate/index"> 配置分类</a></li>
                        <li class="pull-right">
                            <a class="btn btn-primary btn-xs" href="/backend/addons/rf-wechat/rule/edit"><i
                                    class="fa fa-plus"></i> 创建</a>
                        </li>
                    </ul>
                </div>
                -->

                <div class="box-body table-responsive">
                                        <div class="menu-buttons m-b-sm">
                        <a href="<?=url('seller/ShopCategory/create')?>" class="btn btn-sm btn-primary"><i class="fa fa-plus" ></i> 新增分类</a>
                    </div>
                    
                    <table id="table-index" class="table table-hover"><thead>
                    <tr>
                        <th style="width: 10%;">ID</th>
     
                        <th style="width: 20%;">分类名称</th>

                        <th style="width: 10%;">上级分类</th>
          
                        <th style="width: 10%;">排序</th>
          
                        <th style="width: 10%;">是否显示</th>
                                  <th style="width: 10%;">操作</th>
                    </tr>

                    </thead>
                        <tbody>

                    <?php if(!empty($dataProvider)){foreach($dataProvider as $k=>$v): ?>
                        <tr>
                            <td><?=$v['id']?></td>
            
                            <td>
                                <span class="m-l-sm"><?=str_repeat('|------',$v['lev']).$v['name']?></span>
                            </td>

                            <td>
                                <span class="m-l-sm"><?=$v['parent_id']?></span>
                            </td>
                    
                            <td>
                                <span class="m-l-sm"><?=$v['sort_order']?></span>
                            </td>
                    
                            <td>
                                <span class="m-l-sm"><?=$v['is_show_status']?></span>
                            </td>
                        
                            <td>
                                                                <a class="btn btn-primary btn-xs" title="编辑" href="<?=url('seller/ShopCategory/update',['id'=>$v['id']])?>"><i class="fa fa-edit"></i> 编辑</a>
                                
                                
                                                                <a class="btn btn-danger btn-xs" title="删除" href="<?=url('seller/ShopCategory/index',['id'=>$v['id']])?>" onclick="ptyConfirmDelete('<?=url('seller/ShopCategory/delete',['id'=>$v['id']])?>');return false;"><i class="fa fa-trash-o"></i> 删除</a>
                                
                            </td>
                        </tr>

                    <?php endforeach; } ?>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
</section>
{/block}

{block name="js"}
{/block}


